#ifndef FILEIO_H
#define FILEIO_H

#include <QObject>

class FileIO : public QObject
{
    Q_OBJECT

public:
    explicit FileIO(QObject *parent = nullptr);

    Q_INVOKABLE QString userHomePath();

    Q_INVOKABLE bool isFileExists(const QString &fileName);

    Q_INVOKABLE QStringList matchByWildcard(const QString &fileWildcard);

    Q_INVOKABLE QString readTextFile(const QString &fileName);

    Q_INVOKABLE bool writeTextFile(const QString &fileName, const QString& text);

    Q_INVOKABLE bool removeFile(const QString &fileName);

    Q_INVOKABLE bool removeDirectory(const QString &path);

    Q_INVOKABLE bool createDirectory(const QString &path);

    Q_INVOKABLE QString localStoragePath();
};

#endif // FILEIO_H
